﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using DAL;
using Public;

namespace BUL
{
    public class ManageProductBUL
    {
        ManageProductDAL mpDAL = new ManageProductDAL();
        public DataTable LoadProductBUL(string strSearch)
        {
            return mpDAL.LoadProductDAL(strSearch);
        }

        public DataSet LoadProductNameBUL()
        {
            return mpDAL.LoadProductNameDAL();
        }

        public DataSet LoadBrandBUL()
        {
            return mpDAL.LoadBrandDAL();
        }

        public DataSet LoadUnitBUL()
        {
            return mpDAL.LoadUnitDAL();
        }

        public DataTable ProductNameBUL()
        {
            return mpDAL.ProductNameDAL();
        }

        public void DeleteProduct(int id)
        {
            mpDAL.DeleteProduct(id);
        }

        public int UpdateProductDAL(int productId, string barcode, int proNameId,
            int brandId, int unitId, int price, string expriredDate, int quantity)
        {
            return mpDAL.UpdateProductDAL(productId, barcode, proNameId,
                             brandId, unitId, price, expriredDate, quantity);
        }

        public int UpdateProductDAL2(Product product)
        {
            return mpDAL.UpdateProductDAL2(product);
        }
    }
}
